import Relay from "react-relay";

export default class SendGoodsOrderMutation extends Relay.Mutation {

    static fragments = {};

    getMutation() {
        return Relay.QL`mutation { sendGoodsOrder }`;
    }

    getVariables() {
        return {
            argsInput: {
                phone:this.props.phone,
                uid:this.props.uid,
                orderId:this.props.orderId,
                goodsInfo:this.props.goodsInfo,
                logisticsMsg:this.props.logisticsMsg,
                url1:this.props.url1
            }
        };
    }

    getFatQuery() {
        return Relay.QL`fragment on sendGoodsOrderPayload {
            sendGoodsOrder {
                errorCode
                order{
                    oid
                }
            }
        }`;
    }

    getConfigs() {
        return [{
            type: 'REQUIRED_CHILDREN',
            children: [Relay.QL`
              fragment on sendGoodsOrderPayload {
                    sendGoodsOrder {
                        errorCode
                        order{
                            oid
                        }
                    }
             }
            `]
        }];
    }

}
